package com.dongzili.auth.controller;

import com.dongzili.common.entity.Role;
import com.dongzili.common.controller.BaseController;
import com.dongzili.common.mybatisplus.MybatisPlusUtil;
import com.dongzili.common.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 角色控制器
 */
@RestController
@RequestMapping("role")
public class RoleController extends BaseController<Role> {

    @GetMapping("all")
    public R<List<Role>> all(){
        return R.success(MybatisPlusUtil.getMapper(Role.class).selectList(null));
    }
}
